#include<stdio.h>
#include<string.h>

int main()
{
	int sign=0,num=0,h,key=0;
	char c[60]={'\0'},start;
	gets(c);
	while(sign<strlen(c))
	{
		num=0;
		if(c[sign]>='a'&&c[sign]<='z')
		{
			key=0;
			start=c[sign];
			sign++;
			while(c[sign]>='0'&&c[sign]<='9')
			{
				key=1;
				num*=10;
				num+=c[sign]-'0';
				sign++;
			}
			if(key==0) num=1;
			for(h=0;h<num;h++)
			{
				printf("%c",start);
			}
		}
	}
	printf("\n");
	return 0;
}
